<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="my" uri="http://mytag.wangwang.com/jsp/jstl/tags"%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<meta name="description" content="Draggabble Widget Boxes with Persistent Position and State" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<c:set var="ctx" value="${pageContext.request.contextPath}" />
		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="${ctx }/static/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="${ctx }/static/assets/font-awesome/4.5.0/css/font-awesome.min.css" />
		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="${ctx }/static/assets/css/jquery-ui.custom.min.css" />
		<!-- text fonts -->
		<link rel="stylesheet" href="${ctx }/static/assets/css/fonts.googleapis.com.css" />
		<link rel="stylesheet" href="${ctx }/static/assets/css/bootstrap-datepicker3.min.css" />
		<!-- ace styles -->
		<link rel="stylesheet" href="${ctx }/static/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
		<!--[if lte IE 9]>
			<link rel="stylesheet" href="${ctx }/static/assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="${ctx }/static/assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="${ctx }/static/assets/css/ace-rtl.min.css" />
		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="${ctx }/static/assets/css/ace-ie.min.css" />
		<![endif]-->
		<!-- inline styles related to this page -->
		
		<!-- ace settings handler -->
		<script src="${ctx }/static/assets/js/ace-extra.min.js"></script>
		
		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
		<!--[if lte IE 8]>
		<script src="${ctx }/static/assets/js/html5shiv.min.js"></script>
		<script src="${ctx }/static/assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body style="background-color: #fff;">
		<div class="col-sm-9">
			<form id='agentQueryForm' class="form-inline">
				<div class="input-group" style="">
					<select id="query_level" name="level" class="form-control">
						<option value="" >全部</option>
						<option value="1">代理玩家</option>
						<option value="0">普通玩家</option>
					</select>
					<script>
						$("#query_level").val("${level}");
					</script>
					<input type="hidden" name="topId" value="${topId}"/>
				</div>
				<div class="input-group" style="">
					<input id="queryInputStr" value="${queryStr }" type="text" name="queryStr" class="form-control search-query" placeholder="输入ID或昵称">
					<input id="queryInputParentId" type="hidden" name="parentId" value="${parentId }" />
					<input id="queryInputOrderBy" type="hidden" name="orderBy" />
				</div>

				<div class="input-group input-daterange"  style="width: 60%">
					<input type="text" class="form-control" name="sd" value="${sd }">
					<span class="input-group-addon">
						<i class="fa fa-exchange"></i>
					</span>
					<input type="text" class="form-control" name="ed" value="${ed }">
					<div class="input-group-btn">
						<button type="button" class="btn btn-purple btn-sm" onclick="refreshPage()">
							<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
							查询
						</button>
						<!-- 
						<button style="margin-left:10px;" type="button" class="btn btn-primary btn-sm" onclick="openAgentDialog()">
							<span class="ace-icon fa fa-plus icon-on-right bigger-110"></span>
							设置代理
						</button>
						 -->
						<%--
						<c:if test="${1 == sessionScope.session_admin_user_key.roleId}" >
							<button style="margin-left:10px;" type="button" class="btn btn-warning btn-sm" onclick="openUnAgentDialog()">
								<span class="ace-icon fa fa-minus icon-on-right bigger-110"></span>
								解除代理
							</button>
						</c:if>
						
						<c:if test="${my:hasButtonRole('rechargeButton')}" >
							<button style="margin-left:10px;" type="button" class="btn btn-danger btn-sm" onclick="opeanChargeDialog()">
								<span class="ace-icon fa fa-rmb icon-on-right bigger-110"></span>
								充值
							</button>
						</c:if>
						 --%>
					</div>
				</div>

				<div class="input-group">

					<div id="agentDialog" style="padding-top: 13px;display:none;">
						<table id="table_report" class="table table-striped table-bordered table-hover">
							<tbody>
							<tr id="">
								<td align="right" style="width:100px;">玩家ID：</td>
								<td align="left">
									<input id='setagent_userid'
										   onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'')"
										   type="text" class="form-control"
										   placeholder="请输入要设为代理的玩家ID" maxlength="255" style="width:98%;">
								</td>
							</tr>
							<tr id="">
								<td align="right" style="width:100px;">上级ID：</td>
								<td align="left">
									<input id='setagent_parentId' value="100500" type="text" class="form-control"
										   onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'')"
										   placeholder="请输入要设为代理玩家的上级代理ID或上级代理邀请码"  maxlength="255" style="width:98%;">
								</td>
							</tr>
							<tr id="">
								<td align="right" style="width:100px;">代理等级：</td>
								<td align="left">
									<select id='setagent_userLevel' class="form-control" id="form-field-select-1">
										<option value="2">总代</option>
										<option value="3">一级代理</option>
										<option value="4">二级代理</option>
										<option value="0">普通玩家</option>
									</select>
								</td>
							</tr>
							<tr><td colspan="2"><div id="promptTxt" style="padding:10px;color:#f00;"></div></td></tr>
							</tbody></table>
					</div>
					<div id="unAgentDialog" style="padding-top: 13px;display:none;">
						<table id="table_report" class="table table-striped table-bordered table-hover">
							<tbody>
							<tr id="">
								<td align="right" style="width:100px;">玩家ID：</td>
								<td align="left">
									<input id='unsetagent_userid'
										   onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'')"
										   type="text" class="form-control"
										   placeholder="请输入要解除代理的玩家ID" maxlength="255" style="width:98%;">
								</td>
							</tr>
							<tr><td colspan="2"><div id="promptTxt1" style="padding:10px;color:#f00;"></div></td></tr>
							</tbody></table>
					</div>
					<div id="charge_confrimDialog" style="display:none">
						<div class="col-xs-12 col-sm-12 center">
							<div>
							<span class="profile-picture">
								<img id="avatar" width=182 height=182 onerror="onerror=null;src='https://res.wx.qq.com/a/wx_fed/common_assets/16120602/win_weixin21/images/phone_logo2x.png'" class="editable img-responsive editable-click editable-empty" src=""></img>
							</span>

								<div class="space-4"></div>

							</div>
							<div class="profile-user-info profile-user-info-striped hover" style="width:100%;margin:0">
								<div class="profile-info-row">
									<div class="profile-info-name"> 用户ID/昵称</div>

									<div class="profile-info-value">
										<span id=confrim_nickName class="editable editable-click" id="username">ss</span>
									</div>
								</div>

								<div class="profile-info-row">
									<div class="profile-info-name"> 邀请人 </div>

									<div class="profile-info-value">
										<span id=confrim_father class="editable editable-click" id="username"></span>
									</div>
								</div>

								<div class="profile-info-row">
									<div class="profile-info-name"> 现有金币 </div>

									<div class="profile-info-value">
										<span id=confrim_now class="editable editable-click"></span>
									</div>
								</div>
								<div class="profile-info-row">
									<div class="profile-info-name">充值类型</div>

									<div class="profile-info-value">
										<span style="color: red;font-weight: bolder;" class="editable editable-click" id="confrim_type">金币</span>
									</div>
								</div>

								<div class="profile-info-row">
									<div class="profile-info-name">充值金额</div>

									<div class="profile-info-value">
										<span style="color: red;font-weight: bolder;" class="editable editable-click" id="confrim_thistime"></span>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div id="unagent_confrimDialog" style="display:none">
						<div class="row">
							<div class="col-sm-12 center">
								<div>
							<span class="profile-picture">
								<img id="unagent_avatar" width=182 height=182 onerror="onerror=null;src='https://res.wx.qq.com/a/wx_fed/common_assets/16120602/win_weixin21/images/phone_logo2x.png'" class="editable img-responsive editable-click editable-empty" src=""></img>
							</span>

									<div class="space-4"></div>

								</div>
								<div class="profile-user-info profile-user-info-striped hover" style="width:100%;margin:0">
									<div class="profile-info-row">
										<div class="profile-info-name"> 用户ID/昵称</div>

										<div class="profile-info-value">
											<span  class="editable editable-click" id="unagent_user"></span>
										</div>
									</div>

									<div class="profile-info-row">
										<div class="profile-info-name"> 代理ID</div>

										<div class="profile-info-value">
											<span  class="editable editable-click" id="unagent_userAgentId"></span>
										</div>
									</div>

									<div class="profile-info-row">
										<div class="profile-info-name" style="width:130px">父级用户</div>
										<div class="profile-info-value">
											<span class="editable editable-click" id="unagent_user_father"></span>
										</div>
									</div>

									<div class="profile-info-row">
										<div class="profile-info-name" style="width:130px">父级代理ID</div>
										<div class="profile-info-value">
											<span class="editable editable-click" id="unagent_user_father_agentId"></span>
										</div>
									</div>




									<div class="profile-info-row">
										<div class="profile-info-name"> 关联后台用户账号 </div>
										<div class="profile-info-value">
											<span class="editable editable-click" id="unagent_user_admin"></span>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div id="chongzhiDialog" style="padding-top: 13px;display:none;">
						<table id="table_report" class="table table-striped table-bordered table-hover">
							<tbody>
							<tr>
								<td style="width:75px;text-align: right;padding-top: 13px;">我的﻿金币:</td>
								<td><span id="chongzhiDialog_goldCoinCount">0</span></td>
							</tr>
							<tr>
								<td style="width:75px;text-align: right;padding-top: 13px;">充值账户:</td>
								<td><span id="chongzhiDialog_userId">112007</span></td>
							</tr>
							<tr>
								<td align="right" style="width:100px;">充值类型：</td>
								<td align="left">
									金币
								</td>
							</tr>
							<c:if test="${1 != sessionScope.session_admin_user_key.roleId}" >
								<tr id="inNumber">
									<td align="right" style="width:100px;">选择数量：</td>
									<td align="left">
										<select class="form-field-select-1 col-xs-10 col-sm-5" name="goldLv" id="goldLv">
											<option value="lv8">200元6000金币</option>
											<%--<option value="lv1">500元18750金币</option>--%>
											<option value="lv7">500元20000金币</option>
											<option value="lv2">1000元42000金币</option>
											<option value="lv3">2000元90000金币</option>
											<option value="lv4">5000元249000金币</option>
											<option value="lv5">10000元540000金币</option>
											<option value="lv6">30000元2235000金币</option>
										</select>
									</td>
								</tr>
							</c:if>
							<c:if test="${1 == sessionScope.session_admin_user_key.roleId}" >
								<tr id="inNumber">
									<td align="right" style="width:100px;">输入数量：</td>
									<td align="left">
										<input id='chongzhi_num' type="text" class="form-control" placeholder="请输入数量" value="1" style="width:98%;">
									</td>
								</tr>
							</c:if>
							<tr><td colspan="2"><div id="promptTxt2" style="padding:10px;color:#f00;"></div></td></tr>
							</tbody></table>
					</div>
				</div>
			</form>
		</div>

		<div id=context>
		</div>
	</body>
	<script src="${ctx }/static/assets/js/jquery-2.1.4.min.js"></script>
	<script src="${ctx }/static/js/paging.js"></script>
	<script src="${ctx }/static/js/xh_myAgent.js"></script>
	<script src="${ctx }/static/assets/js/bootstrap-datepicker.min.js"></script>
	<script>
        var ctx = "${ctx}";
        var dataUrl = ctx + "/admin/userList/pageList";
        var contextId = "context";
        var formId = "agentQueryForm";
        
	</script>
</html>
